Set Speed of Conveyor and Move

  • Function:

    magicbox.set_converyor(index,enable,speed)
    
  • Description: Set the speed of the conveyor and control its movement

  • Required parameter:

    • index: motor index, range: 0~1, which can also be set as characters.
      • 0: magicbox.STP1
      • 1: magicbox.STP2
    • enable: enable the conveyor. True: enable; False: disable
    • speed: speed of motor. unit: pulses per second
  • Return:

    • True: The command has been finished.
    • False: The command has not been finished.
  • Example

    magicbox.set_converyor(index=magicbox.STP1,enable=True,speed=250.0)
    

    The conveyor starts running at the speed of 250 pulses per second. The motor index is MagicBox.STP1.

results matching ""

    No results matching ""